rust-hwi
NB: This is a temporary fork of https://github.com/bitcoindevkit/rust-hwi. The plan is the full rewrite from scratch not to depend and not to work with the command-line python hwi
utility and use libusb
directly from rust - with improved data types and error reporting.
Here is the copy of the original README:
Rust wrapper for HWI.
This library internally uses PyO3 to call HWI's functions. It is not a re-implementation of HWI in native Rust.
MSRV
The MSRV for this project is 1.48.0
. To build with the MSRV you will need to pin some dependencies:
Prerequisites
Python 3 is required. The libraries and udev rules for each device must also be installed. Some libraries will need to be installed
For Ubuntu/Debian:
For Centos:
For macOS:
Install
- Clone the repo
&&
- Create a virtualenv:
- Install all the dependencies using pip:
Usage
use Network;
use DerivationPath;
use Error;
use HWIClient;
use FromStr;
Testing
To run the tests, you need to have a hardware wallet plugged in. If you don't have a HW for testing, you can try:
Don't use a device with funds for testing!
Either use a testing device with no funds, or use a simulator.
You can run the tests with cargo test
.